package main.java.exception;

public class ExceptionApiDemo {
    public static void main(String[] args) {
        System.out.println("程序开始了");
        try{
            String s = "abc";
            int a = Integer.parseInt(s);
        }catch(NumberFormatException e){
            e.printStackTrace();
            System.out.println("message"+e.getMessage());
            System.out.println("出现数字格式化异常");
        }
        System.out.println("程序结束了");
    }
}
